<template>
	<view>
		<view class="tab-container">
			<scroll-view scroll-y @scroll="onPageScroll1" class="page" scroll-y="true">
				<!-- 搜索 -->
				<homeSearch :readonly="true" :top="top" />
				<view class="swiper">
					<!-- banner 轮播 -->
					<!--  :autoplay="true" :interval="5000" -->
					<uv-swiper :height="deviceType === 'pad' ? 380 : 300" :radius="0" :list="banners"
						@change="e => current = e.current" @click="bannerClick" :autoplay="false"
						indicatorStyle="bottom: 20px;">
						<view slot="indicator" class="indicator">
							<view class="indicator__dot" v-for="(item, index) in banners" :key="index"
								:class="[index === current && 'indicator__dot--active']">
							</view>
						</view>
					</uv-swiper>
					<image class="banner-bg" src="../../../static/image/banner-bg.jpg"></image>
				</view>
				<view class="home-page-main">
					<!-- menu -->
					<scroll-view scroll-x="true" style="width: 100%;">
						<view class="home-page-menu">
							<view class="menu-item" v-for="(item,index) in menu" :key="index" @click="menuClick(item)">
								<view class="menu-item-icon">
									<image
										:src="require('../../../static/image/homePage/menu-icon-' + item.icon + '.png')"
										class="icon"></image>
								</view>
								<view class="border"></view>
								<view class="menu-title">{{item.title}}</view>
								<view class="menu-title-en">{{item.enTitle}}</view>
							</view>
						</view>
					</scroll-view>





					<!-- 进度环 -->
					<!-- 	<view>
						<iCircle :percent="percent" :size="300" :stroke-color="color" BgId="BgId" InId="InId">
							<icon v-if="percent == 100" type="success" size="100" color="#5cb85c" />
							<text v-else style="font-size:24px; color: #FFFFFF;">{{ percent }}%</text>
							<view slot="canvas">
								<canvas class="CanvasBox strokeCanvas" canvas-id="BgId"></canvas>
								<canvas class="CanvasBox trailCanvas" canvas-id="InId"></canvas>
							</view>
						</iCircle>
					</view> -->


					<!-- 快速开始 -->
					<view class="home-page-title" @click="fnDemo()">快速开始｜Quick Start</view>
					<view class="quick-flex">
						<view class="fjj-bg quick-item quick-item1" @click="randomExercise">
							<view class="fjj-box">
								<view class="fjj-diwen">
									<view>
										<image class="quick-icon" src="../../../static/image/fjj/s-mode.png"
											mode="heightFix"></image>
										<view class="cn">随机练习</view>
										<view class="en">Random Exercise</view>
									</view>
								</view>
							</view>
						</view>
						<view class="fjj-bg quick-item quick-item2" @click="quickMatch">
							<view class="fjj-box">
								<view class="fjj-diwen">
									<view>
										<image class="quick-icon" src="../../../static/image/fjj/o-mode.png"
											mode="heightFix"></image>
										<view class="cn">快速匹配</view>
										<view class="en">Quick Match</view>
									</view>
								</view>
							</view>
						</view>
					</view>
					<!-- 蜂竞技 -->
					<view class="home-page-title">蜂竞技｜Bee Competition</view>
					<view class="fjj-bg">
						<view class="fjj-box">
							<view class="fjj-diwen">
								<view class="fjj-hoz">
									<!-- <uv-scroll-list :indicator="true" indicatorColor="rgba(255,255,255,0.3)" indicatorActiveColor="#ffffff"> -->
									<!--  :class="index === 7 ? 'not-open' : ''" -->
									<view class="fjj-item" v-for="(item, index) in fjjList" :key="index"
										@click="fjjClick(item, index)">
										<image class="fjj-item-bg"
											:src="require('../../../static/image/homePage/jj-'+ item.alias +'.png')">
										</image>
										<view class="fjj-item-title">{{item.name}}</view>
										<view class="fjj-item-title-en">{{item.en_name}}</view>
									</view>
									<!-- </uv-scroll-list> -->
								</view>
							</view>
						</view>
					</view>




					<!-- <view class="home-page-title" @click="fnTxAsr()">腾讯一句话：</view> -->
					<!-- <view class="home-page-title" @click="oralAssessment()">-</view> -->
					<!-- <view class="home-page-title" @click="keyboard()">-</view> -->
					<!-- <view class="home-page-title" @click="fnTxAsr()">实时语音识别</view> -->
					<!-- <view class="home-page-title" @click="fnLanyaVoice()">蓝牙录音</view> -->
					<!-- <view class="home-page-title" @click="fnTxAsr60()">一句话识别</view>
					<view class="home-page-title" @click="fnFace()">人脸识别</view>
					<view class="home-page-title" @click="fnFaceID()">faceID</view>
					<view>
						<img style="width: 100px;height:100px;" v-if="faceImage" :src="faceImage" alt="" />
						<jsfun-record voicePath="" :maxTime="15" :minTime="5" @okClick="saveRecord">
							<view class="centerwz">录制语音</view>
						</jsfun-record>
					</view> -->


					<view class="home-page-title">蜂词典｜Bee Word Bank</view>
					<view class="fck-flex">
						<view class="fck-con" v-for="(item,i) in productList" :key="i" @click="fckClick(item)">
							<view class="fck-box">
								<view class="fck-bg">
									<image class="img" src="../../../static/image/homePage/icon-ciku.png" mode="">
									</image>
									<view class="txt">
										<view class="h1">
											{{item.dictLabel}}
										</view>
										<view class="h2">
											{{item.dictName}}
										</view>
									</view>
								</view>
							</view>
							<view class="fck-shadow"></view>
						</view>
					</view>
					<view class="home-page-title mb-9">蜂计划｜Bee Plan</view>
					<view class="mb-9">
						<wordCard ref="wordCard" @planBeeClicked="planDetailClicked"></wordCard>
					</view>
					<!-- 
					<view class="home-page-title">蜂课堂精选课程｜Bee Class</view>
					<view class="fkt-list">
						<view class="fkt-item" v-for="(item,i) in 3" :key="i">
							<view class="fkt-bg">
								<view class="fkt-lf">
									<image class="fkt-img" src="../../../static/image/homePage/1.jpg" alt="" />
									<view class="fkt-tit">
										<view class="fkt-h1">
											拼读写作课程
										</view>
										<view class="fkt-h2">
											English Name
										</view>
										<view class="fkt-h3">
											精选课程
										</view>
									</view>
								</view>
								<view class="fkt-rt">
									GO!
								</view>
							</view>
						</view>
					</view> -->
				</view>
			</scroll-view>
			<popPromptBox v-if="userInfoGuide" msg="请先完善个人信息" btnTxt="去完善" :showClose="true"
				@confirm="userInfoGuideConfirm" @close="userInfoGuideCancel"></popPromptBox>

			<popPromptBox v-if="showLogin" msg="请登录" btnTxt="去登录" :showClose="true" @confirm="handleToLogin"
				@close="showLogin = false"></popPromptBox>

			<popPromptBox v-if="showVipInfo" :msg="vipMsg" btnTxt="确定" @confirm="showVipInfo = false"
				@close="showVipInfo = false"></popPromptBox>

			<popPromptBox v-if="updatePop" title="发现新版本" :msg="updateMsg" :showClose="canClose" btnTxt="马上安装"
				@confirm="updateConfirm" @close="updatePop = false"></popPromptBox>

			<!--  -->
			<selectContentView v-if="isFirstIn" title="个人信息保护政策"
				msg="感谢您信任并使用拼词之星的产品和服务。我们根据最新的法律法规、监管政策要求，更新了《隐私政策》，特向您推送本提示。请您仔细阅读并充分理解相关条款。拼词之星会通过《隐私协议》 我们可能会申请系统设备权限收集设备MAC地址、软件安装列表SD卡数据信息,OAID,通讯录,相机权限,存储图片权限,剪贴板和短信行为以及收集用户数据信息。"
				confirmTitle="同意并继续" cancelTitle="不同意" :showUserInfo="true" @confirm="agreeFn" @cancel="refuseFn">
			</selectContentView>
			<!-- tabbar-->
			<tabbar :activeIndex="0"></tabbar>

			<!-- 为了使外网图片加载快些，在这个页面先预加载 -->
			<!-- <view class="">
				<img style="width: 100%;" src="https://cdn.spbcn.org/jzy/biaoqing/daiji.png" alt="">
				<img style="width: 100%;" src="https://cdn.spbcn.org/jzy/biaoqing/keai.png" alt="">
				<img style="width: 100%;" src="https://cdn.spbcn.org/jzy/biaoqing/shuohua.png" alt="">
				<img style="width: 100%;" src="https://cdn.spbcn.org/jzy/biaoqing/ku.png" alt="">
			</view> -->
		</view>
	</view>
</template>

<script>
	import homeSearch from '../../../components/homeSearch.vue';
	import wordCard from '../../../components/planBeeCom/wordCard.vue';
	import jsfunRecord from '@/components/jsfun-record/jsfun-record.vue';
	import permision from "@/js_sdk/wa-permission/permission.js";
	import iCircle from '@/components/xiaoran-circle/xiaoran-circle.vue';
	export default {
		config: {
			disableScroll: true
		},
		// onBackPress(options) {
		// 	// 点击虚拟键或者侧滑的时候触发（不允许返回）1
		// 	if (options.from === 'backbutton') {
		// 		return true
		// 	}
		// 	// 否则则允许返回
		// 	return false;
		// },
		components: {
			homeSearch,
			wordCard,
			jsfunRecord,
			iCircle
		},
		data() {
			return {
				scrollViewHeight: 0,
				userInfo: {},
				percent: 0,
				lastBackPressTime: 0, // 记录上次点击的时间
				vipMsg: '',
				showVipInfo: false,
				faceImage: '',
				isFirstIn: false, // 用于控制隐私弹窗显隐
				type: "",
				daren_object: {},
				game_object: {},
				current: 0,
				current_background_voice_type: 'menu',
				background_volume_of_menu: uni.getStorageSync('background_volume_of_menu') >= 0 ? uni.getStorageSync(
					'background_volume_of_menu') : 0.5,
				background_volume_of_rank: uni.getStorageSync('background_volume_of_rank') >= 0 ? uni.getStorageSync(
					'background_volume_of_rank') : 0.5,
				background_volume_of_game: uni.getStorageSync('background_volume_of_game') >= 0 ? uni.getStorageSync(
					'background_volume_of_game') : 0.1,
				banners: [
					// 放一张本地图片，防止网络慢白屏
					require('../../../static/image/banner.png')
				],
				bannerData: [],
				top: 0,
				menu: [],
				fjjList: [{
						alias: 'pcjj',
						name: '拼词竞技',
						en_name: 'Word Competition'
					},
					{
						alias: 'jspc',
						name: '极速拼词',
						en_name: 'Speed Spell'
					},
					{
						alias: 'zmjl',
						name: '字母接龙',
						en_name: 'Letter By Letter'
					},
					{
						alias: 'xspc',
						name: '线索拼词',
						en_name: 'Show And Spell'
					},
					{
						alias: 'hysc',
						name: '慧眼识词',
						en_name: 'Laser Letters'
					},
					{
						alias: 'cytz',
						name: '词源挑战',
						en_name: 'Origins Challenge'
					},
					{
						alias: 'jggpc',
						name: '九宫格拼词',
						en_name: 'Super Words'
					},
					{
						alias: 'nwwd',
						name: '你问我答',
						en_name: 'Guess And Spell'
					},
					{
						alias: 'sqpp',
						name: '神奇偏旁',
						en_name: 'Magic Component'
					},
					{
						alias: 'mlbs',
						name: '魔力部首',
						en_name: 'Magic Radical'
					},
					{
						alias: 'fktyz',
						name: '疯狂同音字',
						en_name: 'Crazy Homophone'
					}
				],

				userInfoGuide: false,
				productList: [{
						dictLabel: '个人赛冠军词库',
						dictName: 'Champion Word Bank for Individual Competitions'
					},
					{
						dictLabel: '团体赛冠军词库',
						dictName: 'Champion Word Bank for Team Competitions'
					}
				],
				isLogin: false,
				showLogin: false,
				top: 0,

				// 当前页面声音属性
				voiceType: 'background_music', //background_music
				voicePlaying: false,

				android_url: '', // 安卓app下载地址
				updatePop: false,
				updateMsg: '',
				platform: '',
				canClose: false,
				deviceType: this.$util.deviceType() // 返回值：pad/phone
			}
		},
		computed: {
			color() {
				let color = '#2db7f5';
				if (this.percent == 10) {
					color = '#fff000';
				}
				if (this.percent == 20) {
					color = '#5cb85c';
				}
				if (this.percent == 20) {
					color = '#aa00ff';
				}
				return color;
			}
		},
		onLoad(options) {
			this.menu = [{
					icon: 'jingji',
					title: '蜂竞技',
					flag: 'jingji',
					enTitle: 'Competition'
				}, {
					icon: 'ciku',
					flag: 'ciku',
					title: '蜂词典',
					enTitle: 'Word Bank'
				},
				{
					icon: 'jihua',
					title: '蜂计划',
					flag: 'jihua',
					enTitle: 'Plan Bee'
				}, {
					icon: 'ftalk',
					title: '蜂Talk',
					flag: 'talk',
					enTitle: 'Bee Talk'
				}, {
					icon: 'daren',
					title: '蜂达人',
					flag: 'daren',
					enTitle: 'Bee Daren'
				}
				// , {
				// 	icon: 'qianghua',
				// 	title: '蜂强化',
				// 	flag: 'qianghua',
				// 	enTitle: 'Bee Qianghua'
				// }
			]
			var that = this;
			uni.hideTabBar({
				animation: false
			})


			// 用户协议
			// 1、弹窗形式
			let platform = uni.getSystemInfoSync().platform.toLowerCase()
			console.log(platform)
			if (platform === 'ios') {
				const isFirstIn = uni.getStorageSync('isFirstIn')
				if (!isFirstIn) {
					this.isFirstIn = true
				} else {
					this.isFirstIn = false
				}
			}
			// 2、跳转页面
			// uni.clearStorage()
			// this.checkPrivacyPolicy()
			// uni.$on("agreePrivacyPolicy", (res) => {
			// 	this.$nextTick(() => {
			// 		this.checkPrivacyPolicy()
			// 	})
			// })


			/**
			 * 首页有登录/未登录区分，调接口在init()里写！！！
			 */
			that.init()
			uni.$on("loginSuccess", (res) => {
				console.error('-==============', res)
				that.init()
			})

			// 监听事件：改变背景音乐类型
			that.$eventBus.$on('callMethodIn_background_type', (data) => {
				console.log('----改变背景音乐类型------------调用指定方法', data)
				// that.voicePlaying = true;
				if (data.status && data.status == 'no') {

				} else {
					uni.setStorageSync('current_background_voice_type', data.type);
				}

				// 调用指定方法:播放背景音乐
				that.current_background_voice_type = data.type;
			})
		},
		onPullDownRefresh() {
			const tokenEn = uni.getStorageSync('TOKEN_EN')
			if (tokenEn) {
				this.getWordListData()
				this.getBeePlanData()
				this.getGameList()
				this.isLogin = true
			} else {
				uni.stopPullDownRefresh(); //停止刷新
			}
		},
		watch: {
			current_background_voice_type(newVal, oldVal) {
				var that = this;

				console.log('---类型改变了，要唱！！！', newVal)
				if (newVal != '') {
					if (that.audioContext) {
						// if (that.current_background_voice_type == 'menu') {
						// 	that.current_background_voice_type = "menu";
						// 	that.audioContext.volume = uni.getStorageSync('background_volume_of_menu');
						// }
						// if (that.current_background_voice_type == 'game') {
						// 	that.current_background_voice_type = "game";
						// 	that.audioContext.volume = uni.getStorageSync('background_volume_of_game');
						// }
						// if (that.current_background_voice_type == 'rank') {
						// 	that.current_background_voice_type = "rank";
						// 	that.audioContext.volume = uni.getStorageSync('background_volume_of_rank');
						// }
						// if (that.current_background_voice_type == 'finish') {
						// 	that.current_background_voice_type = "game";
						// 	that.audioContext.volume = 0.1;
						// }

						// console.log("===that.current_background_voice_type, that.audioContext.volume");
						// console.log(that.current_background_voice_type, that.audioContext.volume);

						var mp3Url = that.$util.getBackgroundMusic(that.current_background_voice_type);
						console.log('mp3Url', mp3Url);

						if (that.audioContext) {
							if (mp3Url != '') {
								that.audioContext.stop();
								// uni.showToast({
								// 	title: '有改变，要播放背景音乐了' + mp3Url,
								// 	icon: 'none'
								// })
								that.audioContext.src = mp3Url;
								that.audioContext.play();
							} else {
								// uni.showToast({
								// 	title: '有改变，要停止背景音乐了',
								// 	icon: 'none'
								// })
								that.audioContext.stop();
							}
						}
					}
				} else {
					if (that.audioContext) {
						that.audioContext.stop();
					}
				}
			}
		},
		onShow() {
			console.log('show')
			const that = this

			if (that.audioContext) {
				that.audioContext.stop();
			}
			if (uni.getStorageSync('TOKEN_YX')) {
				that.getUserInfo();
			} else {
				this.menu = this.menu.filter(item => item.flag !== 'talk');
			}
			that.current_background_voice_type = '';
			uni.setStorageSync('current_background_voice_type', '')

			// uni.getSystemInfo({
			// 	success: function(res) {
			// 		if (res.platform === 'android') {
			// 			// uni.showToast({
			// 			// 	title: 'onShow',
			// 			// 	icon: 'none'
			// 			// })
			// 			// 在页面显示的时候注册监听
			// 			plus.key.addEventListener('backbutton', that.handleBackButton, false);
			// 		}
			// 	}
			// });
		},
		onHide() {
			const that = this

			// uni.getSystemInfo({
			// 	success: function(res) {
			// 		if (res.platform === 'android') {
			// 			// uni.showToast({
			// 			// 	title: 'onHide',
			// 			// 	icon: 'none'
			// 			// })
			// 			// 在页面隐藏的时候移除监听
			// 			plus.key.removeEventListener('backbutton', that.handleBackButton);
			// 		}
			// 	}
			// });
		},
		mounted() {
			const that = this
		},
		methods: {
			addPercent() {
				if (this.percent >= 100) {
					return false;
				}
				if (this.percent == 3.2 ||
					this.percent == 4.8 ||
					this.percent == 6.4 ||
					this.percent == 8) {
					this.percent += 1.7;
				} else {
					this.percent += 1.6;
				}
			},

			// 蓝牙录音测试
			fnLanyaVoice() {
				uni.navigateTo({
					url: '/pages/recTest/main_recTest'
				})
			},
			checkPrivacyPolicy() {
				// console.log('****type*****', type)
				// 个人隐私协议弹窗
				const isFirstIn = uni.getStorageSync('isFirstIn')
				// console.log('isFirstIn----', isFirstIn)
				if (!isFirstIn) {
					this.isFirstIn = true
					uni.redirectTo({
						url: '/pages/tabbar/home/preIndex'
					})
				} else {
					this.isFirstIn = false
				}
				// console.log('isFirstIn------', this.isFirstIn)	
			},
			keyboard() {
				uni.navigateTo({
					url: '/pages/keybpardTest'
				})
			},
			// uniapp 监听点击系统返回键,点击两次退出app
			handleBackButton() {
				const currentTime = new Date().getTime();
				if (currentTime - this.lastBackPressTime < 2000) {
					// 2秒内两次点击，退出应用
					plus.runtime.quit();
				} else {
					// 显示提示或其他操作
					uni.showToast({
						title: '再按一次退出应用',
						icon: 'none'
					});
					// 记录这是第二次点击，并记录时间
					this.lastBackPressTime = currentTime;
				}
			},

			getClipboardData() {
				const that = this
				uni.getClipboardData({
					success: function(res) {
						console.log('剪贴板的内容：' + JSON.stringify(res));
						if (res.data) {
							if (res.data.includes('gameMode')) {
								let options = JSON.parse(res.data)

								console.log("============options.h5")
								console.log(options.h5)
								if (options.h5 == 1) {
									let url = options.path
									let game_mode = options.gameMode
									let game_info = JSON.stringify(options.gameInfo)
									let roomNum = options.roomNum
									console.log(url, game_mode, game_info)
									// 清空剪贴板
									that.clearClipboardData()
									uni.navigateTo({
										url: `/${url}?game_mode=${game_mode}&game_info=${game_info}&h5=1&roomNum=${roomNum}`
									})
								}
							}
						}
					},
					fail: function(err) {
						console.log('读取剪贴板失败：' + JSON.stringify(err));
					}
				});
			},
			clearClipboardData() {
				uni.setClipboardData({
					data: '',
					success: function() {
						console.log('剪贴板内容清空成功');
					},
					fail: function(err) {
						console.error('剪贴板内容清空失败:', err);
					}
				});
			},
			saveRecord: function(recordPath) {
				console.log("===音频文件地址：" + recordPath + "===")
				//do... 可以使用 uni.uploadFile 接口上传到服务器
			},

			checkUpdate() {
				var that = this;
				uni.getSystemInfo({
					success: (info) => {
						if (info.uniPlatform === 'web') return

						// 版本号、通道等信息1
						const version = plus.runtime.version;
						const platform = info.platform.toLowerCase();
						that.platform = platform
						that.$http.getUpdateAppInfo().then(res => {
							if (res.code === 200) {
								console.log(res.data)
								that.android_url = res.data.android_url
								const needUpdate = platform === 'android' ? res.data
									.android_need_update : res.data.ios_need_update
								const newVersion = platform === 'android' ? res.data.android_version :
									res.data.ios_version

								console.log('数据库版本号', newVersion)
								console.log(that.$util.getVersionNumber(version), that.$util
									.getVersionNumber(newVersion))

								// zhangtr 当数据库版本高于app自身的版本号数字时，进行更新提示
								if (newVersion && that.$util.getVersionNumber(version) !== that
									.$util
									.getVersionNumber(newVersion) &&
									that.$util.getVersionNumber(version) < that.$util
									.getVersionNumber(newVersion)) {
									that.updateMsg = platform === 'android' ? '为避免影响体验，请立即更新' :
										'为避免影响体验，请立即前往App Store更新'
									that.updatePop = true
									that.canClose = needUpdate == 1 ? false : true
								}
							}
						})
					}
				})
			},

			updateConfirm() {
				// 用户确定更新
				const that = this
				that.updatePop = false
				if (this.platform === 'android') {
					// 可以调用uni.downloadFile下载并更新应用
					uni.showLoading({
						title: '正在下载',
						mask: true
					})
					uni.downloadFile({
						url: that.android_url, // 新版本的下载地址
						success: function(downloadResult) {
							if (downloadResult.statusCode === 200) {
								// 下载成功，执行更新
								const installUrl = downloadResult.tempFilePath;
								// uni.installApp({
								// 	filePath: installUrl,
								// 	success: function() {
								// 		console.log('更新成功');
								// 	},
								// 	fail: function(err) {
								// 		console.error('更新失败', err);
								// 	}
								// });
								uni.hideLoading()

								plus.runtime.install(installUrl, {
									force: false
								}, function() {
									plus.runtime.restart();
								});
							}
						},
						fail: function(err) {
							console.error('下载失败', err);
						}
					});
				} else {
					//在App Store Connect中的App Store下的app信息，可找到appleId
					let appleId = 6504004311
					plus.runtime.launchApplication({
						action: `itms-apps://itunes.apple.com/cn/app/id${appleId}?mt=8`
					}, function(e) {
						console.log('Open system default browser failed: ' + e.message);
					});
				}
			},

			// 获取游戏列表
			getGameList() {
				var that = this;
				that.$http.getGameList({}).then(res => {
					// console.log('1*******1')
					// console.log(res)
					if (res.code === 200) {
						that.game_list = res.data
						that.fjjList = res.data
						console.log(that.fjjList)
						var game_object = {};
						for (var i = 0; i < that.game_list.length; i++) {
							var game_name = that.game_list[i].name;
							game_object[game_name] = that.game_list[i];
						}
						that.game_object = game_object;
						console.log('that.game_object', that.game_object);

						uni.setStorage({
							key: 'game_object',
							data: game_object
						});
					} else {
						uni.showToast({
							title: res.msg,
							icon: '',
							duration: 2000
						})
					}
				})
			},

			// 获取达人列表
			getDarenList() {
				var that = this;
				that.$http.getTestTypeList({}).then(res => {
					if (res.code === 200) {
						that.daren_list = res.data;
						console.log('that.daren_list', that.daren_list);
						var daren_object = {};
						for (var i = 0; i < that.daren_list.length; i++) {
							var title = that.daren_list[i].title;
							console.log(11111, title)
							that.daren_list[i].name = that.daren_list[i].title;
							daren_object[title] = that.daren_list[i];
						}
						that.daren_object = daren_object;
						console.log('that.daren_object', that.daren_object);

						uni.setStorage({
							key: 'daren_object',
							data: daren_object
						});
					} else {
						uni.showToast({
							title: res.msg,
							icon: '',
							duration: 2000
						})
					}
				})
			},

			agreeFn() {
				this.isFirstIn = false
				uni.setStorageSync('isFirstIn', '1')
			},
			refuseFn() {
				// 退出app
				this.isFirstIn = false
				this.exitApp()
			},
			exitApp() {
				switch (uni.getSystemInfoSync().platform) {
					case 'android':
						plus.runtime.quit();
						break;
					case 'ios':
						plus.ios.import('UIApplication').sharedApplication().performSelector('exit');
						break;
				}
			},

			init() {
				this.getGameList(); // 免登录
				this.getDarenList(); // 免登录
				this.getBanner() // 免登录

				const userInfo = uni.getStorageSync('USER_INFO') ? JSON.parse(uni.getStorageSync('USER_INFO')) : {};
				if (!userInfo.is_fee_daren || userInfo.is_fee_daren == 0) {
					this.menu = this.menu.filter(item => item.flag !== 'daren');
				} else {
					if (!this.menu.filter(item => item.flag === 'daren').length) {
						this.menu.push({
							icon: 'daren',
							title: '蜂达人',
							flag: 'daren',
							enTitle: 'Bee expert'
						})
					}
				}
				var that = this;
				const infoComplete = uni.getStorageSync('infoCompleted');
				const loginFirst = uni.getStorageSync('loginFirst');
				if (loginFirst === '1' && infoComplete === '0') {
					// 弹窗提示完善信息
					this.userInfoGuide = true
				}
				const tokenEn = uni.getStorageSync('TOKEN_EN')
				if (tokenEn && loginFirst === '1') {

					this.getWordListData()
					this.getBeePlanData()
					this.isLogin = true;
					this.getClipboardData(); // 获取剪切板信息
					// iOS取消背景音乐
					// this.voiceInit();

					that.checkUpdate();

					// 判断是安卓手机还是ios手机
					const systemInfo = uni.getSystemInfoSync();
					let platform;
					if (systemInfo.platform === 'android') {
						platform = 'Android';
						// uniapp 安卓底部安全区域 颜色调整
						// #ifdef APP-PLUS
						var Color = plus.android.importClass("android.graphics.Color");
						plus.android.importClass("android.view.Window");
						var mainActivity = plus.android.runtimeMainActivity();
						var window_android = mainActivity.getWindow();
						window_android.setNavigationBarColor(Color.parseColor("#000000"));
						// #endif
					} else if (systemInfo.platform === 'ios') {
						platform = 'iOS';
					}
					console.log(platform); // 输出结果，例如：iOS 或 Android
					uni.setStorageSync('platform', platform);
				}
			},

			voiceInit() {
				if ('创建一个音频对象') {
					const that = this;
					that.audioContext = uni.createInnerAudioContext();
					// if (that.current_background_voice_type == 'menu') {
					// 	console.log('menumenumenumenumenumenumenumenumenumenu')
					// 	that.audioContext.volume = that.background_volume_of_menu;
					// }
					// if (that.current_background_voice_type == 'rank') {
					// 	console.log('rankrankrankrankrankrankrankrankrankrankrankrankrank')
					// 	that.audioContext.volume = that.background_volume_of_rank;
					// }
					// if (that.current_background_voice_type == 'game') {
					// 	console.log('gamegamegamegamegamegamegamegamegamegame')
					// 	that.audioContext.volume = that.background_volume_of_game;
					// }
					that.audioContext.loop = true;

					// 监听错误事件
					that.audioContext.onError((res) => {
						// console.error('音频加载或播放错误', res);
						//MediaError（媒体错误）：表示音频播放过程中出现了媒体相关的错误。
						if (res && res.errMsg == 'MediaError') {

						}
						// SrcError（资源路径错误）：表示音频资源路径设置不正确的错误
						if (res && res.errMsg == 'SrcError') {
							uni.showToast({
								title: 'SrcError，请重试~',
								icon: 'error'
							})
						}
					});

					// 监听音频开始播放
					that.audioContext.onPlay(() => {
						console.log('音频开始播放');
						// if (uni.getStorageSync('fayinguan_volume_status') == false) {
						// 	that.audioContext.volume = 0;
						// } else {
						// 	that.audioContext.volume = uni.getStorageSync('yinyue_volume_value');
						// }
						// console.log('音频正在播放');
						if (uni.getStorageSync('appEnterBackground') == false) {
							if (uni.getStorageSync('yinyue_volume_status') == true) {
								if (uni.getStorageSync('current_background_voice_type') == 'menu') {
									// console.log('哈哈哈，我是小当家')
									// that.current_background_voice_type = "menu";
									that.audioContext.volume = uni.getStorageSync('background_volume_of_menu');
								}
								if (uni.getStorageSync('current_background_voice_type') == 'game') {
									// that.current_background_voice_type = "game";
									that.audioContext.volume = uni.getStorageSync('background_volume_of_game');
								}
								if (uni.getStorageSync('current_background_voice_type') == 'rank') {
									// that.current_background_voice_type = "rank";
									that.audioContext.volume = uni.getStorageSync('background_volume_of_rank');
								}
								if (uni.getStorageSync('current_background_voice_type') == 'finish') {
									// that.current_background_voice_type = "game";
									that.audioContext.volume = 0.1;
								}
							} else {
								that.audioContext.volume = 0;
							}
						} else {
							that.audioContext.volume = 0;
						}
					});

					// 监听音频播放中事件
					that.audioContext.onTimeUpdate(() => {

						if (uni.getStorageSync('current_background_voice_type') == '') {
							that.audioContext.volume = 0;
						}

						// console.log('音频正在播放');
						if (uni.getStorageSync('appEnterBackground') == false) {
							if (uni.getStorageSync('yinyue_volume_status') == true) {
								if (uni.getStorageSync('current_background_voice_type') == 'menu') {
									// console.log('哈哈哈，我是小当家')
									// that.current_background_voice_type = "menu";
									that.audioContext.volume = uni.getStorageSync('background_volume_of_menu');
								}
								if (uni.getStorageSync('current_background_voice_type') == 'game') {
									// that.current_background_voice_type = "game";
									that.audioContext.volume = uni.getStorageSync('background_volume_of_game');
								}
								if (uni.getStorageSync('current_background_voice_type') == 'rank') {
									// that.current_background_voice_type = "rank";
									that.audioContext.volume = uni.getStorageSync('background_volume_of_rank');
								}
								if (uni.getStorageSync('current_background_voice_type') == 'finish') {
									// that.current_background_voice_type = "game";
									that.audioContext.volume = 0.1;
								}
							} else {
								that.audioContext.volume = 0;
							}
						} else {
							that.audioContext.volume = 0;
						}
					});

					// 监听音频播放完毕事件
					that.audioContext.onEnded(() => {
						console.log('音频播放完毕');
					});
				}

			},

			// 获取词库信息1
			getWordListData() {
				this.$http.getSysDictDataList({
					dictType: 'champion_thesaurus'
				}).then(res => {
					if (res.code === 200) {
						this.productList = []
						this.productList.push(res.data.find(item => item.dictValue ===
							'individual_champion_thesaurus'))
						this.productList.push(res.data.find(item => item.dictValue === 'itso_champion_thesaurus'))
					}
				})
			},
			// 获取蜂计划信息
			getBeePlanData() {
				const token = uni.getStorageSync('TOKEN_YX')
				if (token) {
					this.$http.beePlanList({}).then(res => {
						if (res.code === 200) {
							let planListData = this.$util.getLastItems(res.data);
							console.log('this.planCardData', planListData);
							this.$refs.wordCard.startAnimation(planListData);
						}
						uni.stopPullDownRefresh(); //停止刷新
					})
				}
			},
			// 点击蜂计划详情
			planDetailClicked(item) {
				if (this.isLogin) {
					if (!this.checkInfo()) return
					if (item.id) {
						//要延时执行的代码
						uni.navigateTo({
							url: '/pages/planBee/wordClockSignInCalendar?planId=' +
								item.id,
						})
					} else {
						uni.navigateTo({
							url: '/pages/planBee/planBeeHome'
						})
					}
				} else {
					this.showLogin = true
				}
			},
			fjhClick() {
				if (this.isLogin) {
					if (!this.checkInfo()) return
					this.planBeeClicked()
				} else {
					this.handleToLogin()
				}
			},
			fckClick(item) {
				if (this.isLogin) {
					if (!this.checkInfo()) return
					this.handleToLex(item)
				} else {
					this.showLogin = true
				}
			},

			// 实时语音识别
			fnTxAsr() {
				permision.judgeIosPermission("camera")


				return false;
				this.requestAndroidPermission('android.permission.CAMERA');
				return false;
				uni.navigateTo({
					url: '/pages/component/demo/demo',
				})
			},

			// vue的method里编写如下代码
			async requestAndroidPermission(permisionID) {
				var result = await permision.requestAndroidPermission(permisionID)
				var strStatus
				if (result == 1) {
					strStatus = "已获得授权"
				} else if (result == 0) {
					strStatus = "未获得授权"
				} else {
					strStatus = "被永久拒绝权限"
				}
				uni.showModal({
					content: permisionID + strStatus,
					showCancel: false
				});
			},


			// 人脸识别
			fnFace() {
				var that = this;
				uni.navigateTo({
					url: '/pages/tabbar/userCenter/baiduface',
				})
			},

			// 人脸识别
			fnFaceID() {
				var that = this;

			},

			// 一句话识别
			fnTxAsr60() {
				uni.showToast({
					title: '一句话识别'
				})
				uni.navigateTo({
					url: '/pages/games/sentenceRecognizer/sentenceRecognizer',
				})
			},

			fnTxAsr() {
				uni.showToast({
					title: '一句话识别'
				})
				uni.navigateTo({
					url: '/pages/txasr/page-head',
				})
			},

			handleToLex(selectData) {
				uni.navigateTo({
					url: '/pages/lexicon/lexiconList?wordModel=' + JSON.stringify(selectData),
				})
			},
			change(e) {
				this.current = e.detail.current;
			},
			handleToGames() {
				var that = this;

				if ('判断网络状态') {
					if (!that.$util.getNetWorkStatus()) {
						return false;
					}
				}

				const game_object = uni.getStorageSync('game_object')
				uni.navigateTo({
					url: '/pages/games/index?game_object=' + encodeURIComponent(JSON.stringify(
						game_object)),
					// animationType: 'slide-in-bottom', // 右侧滑入效果
					// animationDuration: 300 // 动画时长300毫秒
				})
			},
			handleToGameRoom(item) {
				var that = this;
				if ('判断网络状态') {
					if (!that.$util.getNetWorkStatus()) {
						return false;
					}
				}
				let url =
					`/pages/games/${item.alias}/game_${item.alias}_find_room?game_mode=${item.name}|联机模式&game_info=${encodeURIComponent(JSON.stringify(item))}`
				uni.navigateTo({
					url,
					// animationType: 'slide-in-bottom', // 右侧滑入效果
					// animationDuration: 300 // 动画时长300毫秒
				})
			},
			notOpen() {
				uni.showToast({
					icon: 'none',
					title: '暂未开放'
				})
			},
			lexiconClicked() {
				uni.navigateTo({
					url: '/pages/lexicon/lexiconIndex'
				})
			},
			planBeeClicked() {
				uni.navigateTo({
					url: '/pages/planBee/planBeeHome'
				})
			},
			ftalkClicked() {
				uni.navigateTo({
					url: '/pages/ftalk/index'
				})
			},
			oralAssessment() {
				uni.navigateTo({
					url: '/pages/bmaster/oralAssessment'
				})
			},
			beeQianghua() {
				uni.navigateTo({
					url: '/pages/bmaster/oralAssessment'
				})
			},
			spbcnWordBank() {
				// 定义要跳转的目标小程序信息
				const targetMiniProgram = {
					appId: 'wx0cd131a3554ae0be', // 蜂拥教育小程序appid
					path: '/study/pages/championThesaurus/championThesaurus', // 可选参数，指定打开的页面路径
					extraData: {}, // 可选参数，传递给目标小程序的数据
				}

				// 调用uni.navigateToMiniProgram()函数进行跳转
				uni.navigateToMiniProgram(targetMiniProgram)
			},
			async menuClick(item) {
				if (!this.checkInfo()) return
				switch (item.flag) {
					case 'talk':
						this.ftalkClicked()
						break;
					case 'jingji':
						if (!await this.checkVip()) return
						this.handleToGames()
						break;
					case 'ciku':
						this.lexiconClicked()
						break;
					case 'jihua':
						this.planBeeClicked()
						// this.notOpen()
						break;
					case 'daren':
						this.oralAssessment()
						// this.notOpen()
						break;
					case 'qianghua':
						this.beeQianghua()
						// this.notOpen()
						break;
				}
			},
			async fjjClick(item, index) {
				if (!this.checkInfo()) return
				if (!await this.checkVip()) return
				// if (index !== 7) {
				// this.handleToGames()
				this.handleToGameRoom(item)
				// } else {
				// 	uni.showToast({
				// 		title: '暂未开放',
				// 		icon: 'none'
				// 	})
				// }
				// switch (index) {
				// 	case 0:
				// 		this.notOpen()
				// 		break;
				// 	case 1:
				// 		this.handleToGames()
				// 		break;
				// 	case 2:
				// 		this.notOpen()
				// 		break;
				// }
			},
			userInfoGuideConfirm() {
				uni.setStorageSync('loginFirst', '0');
				this.userInfoGuide = false
				uni.navigateTo({
					url: '/pages/tabbar/userCenter/userInfo'
				})
			},
			userInfoGuideCancel() {
				this.userInfoGuide = false
				// uni.setStorage({
				// 	key: 'loginFirst',
				// 	data: '0'
				// });
				uni.setStorageSync('loginFirst', '0');
			},

			checkInfo() {
				const token = uni.getStorageSync('TOKEN_YX')
				const infoC = uni.getStorageSync('infoCompleted')
				console.log(token, infoC)
				if (!token) {
					this.showLogin = true
					return false
				} else if (infoC === '0') {
					// 弹窗提示完善信息
					this.userInfoGuide = true
					return false
				} else {
					return true
				}
			},
			async getUserInfo() {
				const res = await this.$http.getUserInfo()
				this.userInfo = res.data

				console.log("=======================================================================================");
				console.log("=======================================================================================");
				console.log("=======================================================================================");

				console.log(this.userInfo)


				uni.setStorageSync("USER_INFO", JSON.stringify(this.userInfo))
				const systemInfo = uni.getSystemInfoSync();
				const userInfo = uni.getStorageSync('USER_INFO') ? JSON.parse(uni.getStorageSync('USER_INFO')) : {};

				console.log(this.userInfo)
				if (!this.userInfo.is_vip) {
					this.menu = this.menu.filter(item => item.flag !== 'talk');
				} else {
					if (!userInfo.review_android_version) {
						this.menu = this.menu.filter(item => item.flag !== 'talk');
					} else {
						if (systemInfo.appWgtVersion == userInfo.review_android_version) {
							this.menu = this.menu.filter(item => item.flag !== 'talk');
						} else {
							if (!this.menu.filter(item => item.flag === 'talk').length) {
								this.menu.push({
									icon: 'ftalk',
									title: '蜂Talk',
									flag: 'talk',
									enTitle: 'Bee Talk'
								})
							}
						}
					}
				}
			},
			async checkVip() {
				// const userInfo = JSON.parse(uni.getStorageSync('USER_INFO'))
				// console.log(userInfo)
				await this.getUserInfo()
				const userInfo = this.userInfo
				if (!userInfo.vip_expire_time) { // 未开通vip
					this.vipMsg = '您还不是蜂竞技会员，请联系客服开通'
					this.showVipInfo = true
					return false
				} else if (new Date(userInfo.vip_expire_time).getTime() < new Date().getTime()) { // vip已过期
					this.vipMsg = `蜂竞技会员已于${userInfo.vip_expire_time}过期`
					this.showVipInfo = true
					return false
				} else {
					return true
				}
			},
			async bannerClick(index) {
				const currentBanner = this.bannerData[index]
				if (currentBanner.url === '/pages/games/index') {
					if (!this.checkInfo()) return
					if (!await this.checkVip()) return
					// app内蜂竞技
					this.handleToGames()
				} else if (currentBanner.url.includes('http')) {
					// h5链接
					this.handleToBannerBox(currentBanner.url, currentBanner.h5_show_type)
				}
			},
			handleToBannerBox(url, direction) {
				uni.navigateTo({
					// url: '/pages/tabbar/home/bannerBox?url=http://test.cebso.spbcn.org/#/pad/pw?season=2023~2024'
					url: `/pages/tabbar/home/bannerBox?url=${url}&screenDirection=${direction}`
				})
			},
			handleToLogin() {
				this.showLogin = false
				uni.navigateTo({
					url: '/pages/login/login'
				})
			},
			onPageScroll1(e) {
				this.top = e.detail.scrollTop
			},

			getBanner() {
				this.$http.getBanner().then(res => {
					if (res.code === 200) {
						this.bannerData = res.data.filter(item => item.status)
						this.banners = this.bannerData.map(item => item.img)
					}
				})
			},

			fnDemo() {
				// uni.navigateTo({
				// 	url: '/pages/demo/demo'
				// })
			},

			// 随机练习
			async randomExercise() {
				if (!this.checkInfo()) return
				if (!await this.checkVip()) return
				let arr = this.fjjList.filter(item => item.offline_mode_status == 1)
				let index = this.$util.getRandomInteger(0, arr.length - 1)

				let gameInfo = arr[index]
				console.log(arr, gameInfo)
				// let path = ''

				// if (gameInfo.alias === 'jspc') {
				// 	path = `/pages/games/${gameInfo.alias}/game_${gameInfo.alias}_exercise_room`
				// } else {
				let path = `/pages/games/${gameInfo.alias}/game_${gameInfo.alias}_exercise_create_room`
				// }

				let url =
					`${path}?game_mode=${gameInfo.name}|训练模式&game_info=${encodeURIComponent(JSON.stringify(gameInfo))}`

				uni.navigateTo({
					url,
					// animationType: 'slide-in-bottom', // 右侧滑入效果
					// animationDuration: 300 // 动画时长300毫秒
				})
			},
			// 快速匹配
			async quickMatch() {
				if (!this.checkInfo()) return
				if (!await this.checkVip()) return
				let arr = this.fjjList.filter(item => item.pipei_mode_status == 1)
				let index = this.$util.getRandomInteger(0, arr.length - 1)
				let gameInfo = arr[index]
				let path = `/pages/games/${gameInfo.alias}/game_${gameInfo.alias}_pipei_room`
				let url =
					`${path}?game_mode=${gameInfo.name}|联机模式&game_info=${encodeURIComponent(JSON.stringify(gameInfo))}`
				console.log("index-=-=-=-=-", index, gameInfo.name)
				uni.navigateTo({
					url,
					// animationType: 'slide-in-bottom', // 右侧滑入效果
					// animationDuration: 300 // 动画时长300毫秒
				})
			}
		}
	}
</script>

<style lang="less">
	.tab-container {
		background-color: #fff8e1;
		height: 100vh;
	}

	.indicator {
		display: flex;
		align-items: center;
		justify-content: center;
	}

	.indicator__dot {
		height: 6px;
		width: 6px;
		border-radius: 100px;
		background-color: rgba(255, 255, 255, 0.35);
		margin: 0 2px;
		transition: background-color 0.3s;
	}

	.indicator__dot--active {
		background-color: #ffffff;
		width: 24px;
	}

	.home-page-main {
		margin: 0px 12px;
	}

	.home-page-menu {
		display: flex;
		align-items: center;
		justify-content: space-between;
		margin-bottom: 24px;
	}

	.menu-item {
		text-align: center;
		position: relative;
		flex: 1;
		display: flex;
		flex-direction: column;
		align-items: center;
		// .border{
		// 	width: 72px;
		// 	height: 72px;
		// 	position: absolute;
		// 	top: 6px;
		// 	background-color: #9b8b6f;
		// 	border-radius: 12px;
		// 	z-index: 1;
		// }
	}

	.menu-item-icon {
		background: linear-gradient(-45deg, #373632 0%, #130E00 100%);
		box-shadow: 0 6px 0 0 #9b8b6f;
		width: 54px;
		height: 54px;
		margin-bottom: 10px;
		border-radius: 12px;
		box-sizing: border-box;
		display: flex;
		align-items: center;
		justify-content: center;
		position: relative;
		z-index: 10;

		.icon {
			width: 48px;
			height: 48px;
		}
	}

	.menu-title {
		font-weight: bold;
		font-size: 16px;
		color: #000;
	}

	.menu-title-en {
		font-size: 10px;
		// width: 80px;
		color: #000;
		font-weight: bold;
	}

	.home-page-title {
		font-size: 18px;
		font-family: hzgb;
		color: #000;
		border-bottom: 3px solid #ffd52f;
		margin-bottom: 24px;
		display: inline-block;
		padding-bottom: 6px;
		padding-right: 24px;
	}

	.fjj-bg {
		background: linear-gradient(180deg, #373632 0%, #130E00 100%);
		width: 100%;
		height: 160px;
		border-radius: 12px;
		padding: 6px;
		margin-bottom: 24px;
	}

	.fjj-box {
		background: linear-gradient(0deg, #373632 0%, #130E00 100%);
		width: 100%;
		height: 100%;
		border-radius: 8px;
	}

	.fjj-diwen {
		background-image: url(../../../static/image/homePage/diwen.png);
		background-repeat: no-repeat;
		background-size: cover;
		width: 100%;
		height: 100%;
		border-radius: 8px;
		overflow-y: hidden;
		overflow-x: auto;

		// display: flex;
		// align-items: center;
		// justify-content: space-around;
	}

	.fjj-hoz {
		overflow-y: hidden;
		height: 100%;
		// width: 748px;
		white-space: nowrap;

		&::-webkit-scrollbar {
			display: none
		}
	}

	.fjj-item {
		position: relative;
		width: 110px;
		height: 135px;
		text-align: center;
		// margin: 10px 10px 0 0;
		box-sizing: border-box;
		display: inline-block;
		margin: 8px 4px 0;

		.fjj-item-bg {
			width: 100%;
			height: 100%;
		}

		&.not-open {
			opacity: 0.5;
		}

		.fjj-item-title {
			font-family: hzgb;
			font-size: 12px;
			position: absolute;
			top: 72px;
			left: 0;
			width: 100%;
			color: #fff;
		}

		.fjj-item-title-en {
			font-size: 8px;
			position: absolute;
			top: 86px;
			left: 0;
			width: 100%;
			color: #fff;
		}
	}

	.fck-flex {
		display: flex;
		align-items: center;
		justify-content: space-between;
		margin-bottom: 30px;
	}

	.fck-con {
		position: relative;
		width: 48%;

		.fck-box {
			width: 96%;
			height: 76px;
			background: linear-gradient(0deg, #373632 0%, #130E00 100%);
			border-radius: 100px 20px 20px 100px;
			position: relative;
			z-index: 10;
		}

		.fck-shadow {
			width: 96%;
			height: 76px;
			background: #9b8b6f;
			border-radius: 100px 20px 20px 100px;
			position: absolute;
			top: 6px;
			left: 0;
			z-index: 1;
		}

		.fck-bg {
			width: 100%;
			height: 100%;
			background: url(../../../static/image/homePage/diwen.png);
			border-radius: 100px 20px 20px 100px;
			background-size: cover;
			display: flex;
			align-items: center;
			justify-content: flex-start;

			.img {
				width: 50px;
				height: 50px;
				margin-left: 10px;
				margin-right: 6px;
			}

			.txt {
				color: #fff;
				flex: 1;
				margin-right: 10px;

				.h1 {
					font-size: 12px;
					font-weight: bold;
					margin-bottom: 4px;
				}

				.h2 {
					font-size: 8px;
				}
			}
		}

	}

	.mb-9 {
		margin-bottom: 9px;
	}

	.fkt-item {
		background: linear-gradient(0deg, #373632 0%, #130E00 100%);
		width: 100%;
		height: 100px;
		margin-bottom: 12px;
		border-radius: 20px 100px 100px 20px;

		.fkt-bg {
			width: 100%;
			height: 100%;
			border-radius: 20px 100px 100px 20px;
			background: url(../../../static/image/homePage/diwen.png);
			background-size: cover;
			display: flex;
			justify-content: space-between;
			align-items: center;
		}

		.fkt-lf {
			display: flex;
			align-items: center;
		}

		.fkt-rt {
			width: 66px;
			height: 80px;
			margin-right: 12px;
			border-radius: 12px 90px 90px 12px;
			background: linear-gradient(to bottom, #ffd16b 0%, #fff497 100%);
			color: #000;
			font-family: hzgb;
			font-size: 18px;
			font-weight: bold;
			display: flex;
			justify-content: center;
			align-items: center;
		}

		.fkt-img {
			width: 120px;
			height: 80px;
			border-radius: 10px;
			border: 2px solid #d9b059;
			margin-right: 10px;
			margin-left: 10px;
		}

		.fkt-tit {
			flex: 1;
			color: #fff;

			.fkt-h1 {
				font-family: hzgb;
				font-size: 16px;
			}

			.fkt-h2 {
				font-size: 10px;
				margin: 4px 0;
			}

			.fkt-h3 {
				color: #000;
				font-family: hzgb;
				font-size: 12px;
				width: 90px;
				height: 26px;
				text-align: center;
				line-height: 26px;
				border-radius: 26px;
				background: linear-gradient(to bottom, #ffd16b 0%, #fff497 100%);
			}
		}
	}

	.swiper {
		position: relative;

		.banner-bg {
			position: absolute;
			left: 0;
			right: 0;
			bottom: -1px;
			width: 100%;
			height: 20px;
			z-index: 100;
		}
	}

	.page {
		height: calc(100vh - 80px);
	}

	.quick-flex {
		display: flex;
		justify-content: space-between;
		align-items: center;

		.quick-item {
			height: 100px;
			text-align: center;

			.quick-icon {
				height: 40px;
				margin-top: 6px;
			}

			.cn {
				color: #fff;
				font-size: 14px;
				font-family: hzgb;
			}

			.en {
				color: #fff;
				font-size: 10px;
			}
		}

		.quick-item1 {
			margin-right: 8px;
		}

		.quick-item2 {
			margin-left: 8px;
		}


	}
</style>